import Mock from 'mockjs';
const data = Mock.mock({
  // login: {
  //     data: {
  //         'token': 123121212,
  //     },
  //     errno: 0
  // },
  // info: {
  //     data: {
  //         perms: ['*', 'POST /admin/goods/create', 'GET /admin/goods/list', 'GET /admin/ad/create'],
  //         avatar: "https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif",
  //         name: "admin123",
  //         roles: ['超级管理员']
  //     },
  //     errno: 0
  // },
  dashboard: {
    data: {
      perms: ['GET /']

    },
    errno: 0
  },
  // /admin/storage/create
  storage: {
    data: {
      url: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif?imageView2/1/w/80/h/80'
    }
  },
  logout: {
    data: {

    },
    errno: 0
  },
  listRecord: {
    errno: 0,
    data: {
      total: 2, pages: 1, limit: 20, page: 1,
      list: [{ 'id': 10, 'goodsId': 1110008, 'goodsName': '全棉贡缎纯色床单', 'picUrl': 'http://yanxuan.nosdn.127.net/255a4888161f9b4fe530cf319f14551d.png', 'discount': 34, 'discountMember': 3, 'expireTime': '2020-02-13 00:00:00', 'status': 2, 'addTime': '2019-12-24 10:29:25', 'updateTime': '2019-12-24 15:42:11', 'deleted': false }, { 'id': 9, 'goodsId': 1036016, 'goodsName': '日式色织水洗棉床笠', 'picUrl': 'http://yanxuan.nosdn.127.net/513d08057c69fdb7d19cc810e976118d.png', 'discount': 20, 'discountMember': 5, 'expireTime': '2019-12-23 17:17:37', 'status': 0, 'addTime': '2019-12-23 17:17:38', 'updateTime': '2019-12-23 17:17:38', 'deleted': false }]
    },
    errmsg: '成功'
  },
  orderChannel:
    {
      errno: 0, data:
        {
          'total': 3,
          'pages': 5,
          'limit': 20,
          'page': 1,
          'list': [
            { 'id': 66, 'userId': 1, 'orderSn': '20191228795999', 'orderStatus': 2, 'consignee': 'sfdasdf ', 'mobile': '15512347777', 'address': '北京市市辖区东城区 清热', 'message': '', 'goodsPrice': 1.00, 'freightPrice': 10.00, 'couponPrice': 0.00, 'integralPrice': 0.00, 'grouponPrice': 0.00, 'orderPrice': 11.00, 'actualPrice': 11.00, 'comments': 0, 'addTime': '2019-12-28 11:38:19', 'updateTime': '2019-12-28 11:38:19', 'deleted': false },
            { 'id': 66, 'userId': 1, 'orderSn': '20191228795999', 'orderStatus': -5, 'consignee': 'sfdasdf ', 'mobile': '15512347777', 'address': '北京市市辖区东城区 清热', 'message': '', 'goodsPrice': 1.00, 'freightPrice': 10.00, 'couponPrice': 0.00, 'integralPrice': 0.00, 'grouponPrice': 0.00, 'orderPrice': 11.00, 'actualPrice': 11.00, 'comments': 0, 'addTime': '2019-12-28 11:38:19', 'updateTime': '2019-12-28 11:38:19', 'deleted': false },
            { 'id': 66, 'userId': 1, 'orderSn': '20191228795999', 'orderStatus': 202, 'consignee': 'sfdasdf ', 'mobile': '15512347777', 'address': '北京市市辖区东城区 清热', 'message': '', 'goodsPrice': 1.00, 'freightPrice': 10.00, 'couponPrice': 0.00, 'integralPrice': 0.00, 'grouponPrice': 0.00, 'orderPrice': 11.00, 'actualPrice': 11.00, 'comments': 0, 'addTime': '2019-12-28 11:38:19', 'updateTime': '2019-12-28 11:38:19', 'deleted': false }]
        }, errmsg: '成功'
    },
  goodList: {
    errno: 0,
    data: {
      'total': 7,
      'pages': 1,
      'limit': 20,
      'page': 1,
      'list': [{
        'id': 1181042,
        'goodsSn': '007',
        'name': '大馒头',
        'categoryId': 1036035,
        'brandId': 1016002,
        'gallery': ['http://122.51.199.160:8080/wx/storage/fetch/st0d3vtxmig04r6gnaxr.jpg'],
        'keywords': '好吃,热乎',
        'brief': '云朵',
        'isOnSale': true,
        'sortOrder': 100,
        'picUrl': 'http://122.51.199.160:8080/wx/storage/fetch/kbscm0wadrstasx5jag3.jpg',
        'shareUrl': '',
        'isNew': false,
        'isHot': true,
        'unit': '个',
        'counterPrice': 20.00,
        'retailPrice': 1.00,
        'addTime': '2019-12-25 13:37:11',
        'updateTime': '2019-12-30 08:05:43',
        'deleted': false,
        'detail': '<p style="text-align: center;"><sup>云朵发生大范甘迪</sup></p>'
      }, {
        'id': 1181038,
        'goodsSn': '123132132131',
        'name': '1dasdasdasdfff',
        'categoryId': 0,
        'brandId': 0,
        'gallery': ['http://122.51.199.160:8080/wx/storage/fetch/vtrarghp8y8y1n8o6nhd.jpg', 'http://122.51.199.160:8080/wx/storage/fetch/oi9r5n2a1fx76jr9mnf1.jpg', 'http://122.51.199.160:8080/wx/storage/fetch/mvuu0mu5fxhld3ditm58.jpg', 'http://122.51.199.160:8080/wx/storage/fetch/19wcyr1m1ppmu6jg4gic.jpg', 'http://122.51.199.160:8080/wx/storage/fetch/4eojhxhsiovcvuv8u5ql.jpg'],
        'keywords': '',
        'brief': '',
        'isOnSale': true,
        'sortOrder': 100,
        'picUrl': 'http://122.51.199.160:8080/wx/storage/fetch/kb6p4sp2q37r697tbkro.jpg',
        'shareUrl': '',
        'isNew': true,
        'isHot': true,
        'unit': '’件‘',
        'counterPrice': 233.33,
        'retailPrice': 234.00,
        'addTime': '2019-12-24 23:21:55',
        'updateTime': '2019-12-25 13:48:23',
        'deleted': false
      }, {
        'id': 1181031,
        'goodsSn': '1111',
        'name': '哈哈哈哈哈哈哈',
        'categoryId': 1036022,
        'brandId': 1003000,
        'gallery': [],
        'keywords': '',
        'brief': '11',
        'isOnSale': true,
        'sortOrder': 100,
        'picUrl': 'http://122.51.199.160:8080/wx/storage/fetch/6w9w20w05zw32a19dp8t.JPG',
        'shareUrl': '',
        'isNew': true,
        'isHot': false,
        'unit': '’件‘',
        'counterPrice': 111.00,
        'retailPrice': 0.00,
        'addTime': '2019-12-24 16:15:45',
        'updateTime': '2019-12-24 22:50:54',
        'deleted': false,
        'detail': '<p>安防监控哈卡斯等级划分金卡户口登记和健康的回复看见了多少刻录机奥克兰</p>'
      }]
    },
    errmsg: '成功'
  },
  standard: {
    errno: 0,
    data: {
      specifications: [
        {
          specification: '规格1',
          value: '007',
          picUrl:
                        'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif?imageView2/1/w/80/h/80'
        }
      ],
      productForm: {
        id: 0,
        specifications: [],
        price: 0.0,
        number: 0,
        url: ''
      }
    },
    errmsg: '成功'
  },
  goodsRult: {
    'errno': 0,
    'data': {
      'total': 3,
      'pages': 1,
      'limit': 20,
      'page': 1,
      'list': [{
        'id': 1,
        'goodsId': 1039051,
        'goodsName': '多功能午睡枕',
        'picUrl': 'http://yanxuan.nosdn.127.net/c8ca0600fa7ba11ca8be6a3173dd38c9.png',
        'discount': 20,
        'discountMember': 20,
        'expireTime': '2019-12-31 00:00:00',
        'status': 1,
        'addTime': '2018-11-08 13:41:44',
        'updateTime': '2020-01-01 20:28:39',
        'deleted': false
      }]
    },
    'errmsg': '成功'
  }

})
// Mock.mock(/auth\/login/, 'post', () => { //三个参数。第一个路径，第二个请求方式post/get，第三个回调，返回值
//     return data.login
// })

// Mock.mock(/auth\/info/, 'get', () => {
//     return data.info
// })

Mock.mock(/\/dashboard/, 'get', () => {
  return data.dashboard
})

// Mock.mock(/auth\/logout/, 'post', () => {
//     return data.logout
// })

Mock.mock(/groupon\/listRecord/, 'get', () => {
  return data.listRecord
})

// Mock.mock(/admin\/order\/list/, 'post', () => {
//     return data.orderChannel
// })

// Mock.mock(/admin\/goods\/standard/, 'get', () => {
//     console.log(data.standard)
//     return data.standard
// })

// Mock.mock(/admin\/group-buying-rules\/list/, 'post', () => {
//     console.log(data.goodsRult)
//     return data.goodsRult
// })

// Mock.mock(/goods\/list/, 'post', () => {
//     return data.goodList
// })

// Mock.mock(/admin\/storage\/create/,'post',()=>{
//     return data.storage
// })
